
package com.luck.org.entity;

import java.io.Serializable;

import com.luck.pf.util.FormateUtil;

/**
 * @hibernate.class table="V_DEPARTMENT"
 * hibernate.cache usage="read-only"
 * 说明:企业表
 * Copyright: Copyright (c) 2010
 * 深圳**科技 <cache usage="read-only"/>
 * @author zhangwenrui 2010-8-4 下午02:52:10
 * @version 1.0
 */
public class VDepartment implements Serializable {
	private static final long serialVersionUID = 6745695318127991099L;
	private Long id;
	private String deptName;//机构名称
	private String deptCode;//机构代码
	private String shortName ;//简称
	private String deptStatus;//状态,0：停用，1：启用
	private String treeNo;
	private Long parentId;
	private VDepartment parentDept;//所属机构
	private String deptKind;//部门性质 0:部门,1机构
	private String deptLevel;//级别 0:顶级，1：一级，2：二级,与角色的级别对应

	/**
     * @hibernate.id generator-class = "assigned" length = "16"
     * @return
     */
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	/**
     * @hibernate.property length="50" column="dept_name"
     */
	public String getDeptName() {
		return deptName;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	/**
     * @hibernate.property length="20" column="dept_code"
     */
	public String getDeptCode() {
		return deptCode;
	}
	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}

	/**
     * @hibernate.property length="2" column="dept_status"
     */
	public String getDeptStatus() {
		return deptStatus;
	}
	public void setDeptStatus(String deptStatus) {
		this.deptStatus = deptStatus;
	}
	/**
     * @hibernate.property length="20" column="short_name"
     */
	public String getShortName() {
		return shortName;
	}
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	/**
     * @hibernate.property length="50" column="tree_no"
     */
	public String getTreeNo() {
		return treeNo;
	}
	public void setTreeNo(String treeNo) {
		this.treeNo = treeNo;
	}
	/**
     * @hibernate.property length="16" column="p_dept_id"
     */
	public Long getParentId() {
		return parentId;
	}
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
    /**
     * @hibernate.many-to-one class = "com.luck.org.entity.VDepartment" column="p_dept_id" insert="false" update="false" lazy="false"
     * @return
     */
	public VDepartment getParentDept() {
		return parentDept;
	}
	public void setParentDept(VDepartment parentDept) {
		this.parentDept = parentDept;
	}
	/**
     * @hibernate.property length="2" column="dept_kind"
     */
	public String getDeptKind() {
		return deptKind;
	}
	public void setDeptKind(String deptKind) {
		this.deptKind = deptKind;
	}
	/**
     * @hibernate.property length="2" column="dept_level"
     */
	public String getDeptLevel() {
		return deptLevel;
	}
	public void setDeptLevel(String deptLevel) {
		this.deptLevel = deptLevel;
	}
	public String getDeptLevelStr() {
		return FormateUtil.getInstance().getNameByCode("p_dept_level", this.deptLevel);
	}
	public String getDeptStatusStr() {
		if(this.deptStatus.equals("1"))
			return "启用";
		else
			return "停用";
	}
	
}
